<?php
namespace App\Http\Controller;
use EApiSwoole\Support\Facades\DB;
use EApiSwoole\Support\Facades\Redis;
class IndexController
{
    public function demo()
    {
       $data=Redis::keys('*');
       return json_encode($data);
    }

    public function test()
    {
		Redis::incr('num');
        $limit=mt_rand(1,1000000);
        // $limit1=mt_rand(1,5);
        $res=DB::query("select * from user where id={$limit} ");
        return json_encode($res);
    }
}
